package cn.wh.ymcc.feignclients;

import cn.wh.ymcc.domain.User;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class UserFeignClientFallBackFactory implements FallbackFactory<UserFeignClient>{
    @Override
    public UserFeignClient create(Throwable throwable) {
        return new UserFeignClient() {
            @Override
            public User loadByPhone(String phone) {
                return null;
            }

            @Override
            public List<User> loadByAll() {
                return null;
            }
        };
    }
}
